/*
Kakine
ActionScript Framework
Copyright © 2011, PUNY, LLC.

This file is part of KAKINE.

KAKINE is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

KAKINE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with KAKINE.  If not, see <http://www.gnu.org/licenses/>.
*/ 
package com.puny.ball.utils.events
{
	import com.puny.ball.views.obstacles.Obstacle;
	
	import flash.events.Event;

	public class WorldEvent extends Event
	{
		public static const HIT_WALL:String = "hit wall";
		public static const BALL_STOP:String = "ball stop";
		private var _obstacle:Obstacle;
		public function WorldEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
		}
		
		public function get obstacle():Obstacle {
			return _obstacle;
		}
		
		public function set obstacle(value:Obstacle):void {
			_obstacle = value;
		}
		
		override public function clone():Event {
			var event:WorldEvent = new WorldEvent(type, bubbles, cancelable);
			event.obstacle = obstacle;
			return event;
		}
	}
}